# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python

class Recipe(recipe.Recipe):
    name = 'libdca'
    version = '0.0.5'
    stype = SourceType.TARBALL
    url = 'https://download.videolan.org/pub/videolan/libdca/%(version)s/libdca-%(version)s.tar.bz2'
    tarball_checksum = 'dba022e022109a5bacbe122d50917769ff27b64a7bba104bd38ced8de8510642'
    licenses = [License.GPLv2Plus]
    patches = ['libdca/0001-Disable-AC_C_ALWAYS_INLINE.patch']
    autoreconf = True

    files_libs = ['libdca']
    files_bins = ['extract_dca', 'extract_dcs', 'dcadec', 'dcsdec']
    files_devel = ['include/dca.h', 'include/dts.h',
                   'lib/pkgconfig/libdca.pc', 'lib/pkgconfig/libdts.pc']

    def prepare(self):
        if self.config.target_platform == Platform.ANDROID:
            self.configure_options += ' --disable-oss'
